package cn.et.test.dao;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

import cn.et.test.entity.cooking.Cooking;
import cn.et.test.entity.cooking.CookingExample;




public interface CookingMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @SelectProvider(type=CookingSqlProvider.class, method="countByExample")
    long countByExample(CookingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @DeleteProvider(type=CookingSqlProvider.class, method="deleteByExample")
    int deleteByExample(CookingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @Delete({
        "delete from cooking",
        "where cid = #{cid,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer cid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @Insert({
        "insert into cooking (cid, cname, ",
        "kid)",
        "values (#{cid,jdbcType=INTEGER}, #{cname,jdbcType=VARCHAR}, ",
        "#{kid,jdbcType=INTEGER})"
    })
    int insert(Cooking record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @InsertProvider(type=CookingSqlProvider.class, method="insertSelective")
    int insertSelective(Cooking record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @SelectProvider(type=CookingSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="cid", property="cid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="cname", property="cname", jdbcType=JdbcType.VARCHAR),
        @Result(column="kid", property="kid", jdbcType=JdbcType.INTEGER)
    })
    List<Cooking> selectByExampleWithRowbounds(CookingExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @SelectProvider(type=CookingSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="cid", property="cid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="cname", property="cname", jdbcType=JdbcType.VARCHAR),
        @Result(column="kid", property="kid", jdbcType=JdbcType.INTEGER)
    })
    List<Cooking> selectByExample(CookingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @Select({
        "select",
        "cid, cname, kid",
        "from cooking",
        "where cid = #{cid,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="cid", property="cid", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="cname", property="cname", jdbcType=JdbcType.VARCHAR),
        @Result(column="kid", property="kid", jdbcType=JdbcType.INTEGER)
    })
    Cooking selectByPrimaryKey(Integer cid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @UpdateProvider(type=CookingSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Cooking record, @Param("example") CookingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @UpdateProvider(type=CookingSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Cooking record, @Param("example") CookingExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @UpdateProvider(type=CookingSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(Cooking record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table cooking
     *
     * @mbg.generated Wed Dec 13 15:54:46 CST 2017
     */
    @Update({
        "update cooking",
        "set cname = #{cname,jdbcType=VARCHAR},",
          "kid = #{kid,jdbcType=INTEGER}",
        "where cid = #{cid,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Cooking record);
}